package miracle.joker.design.adapter;

public class AudioPlayer implements MediaPlayer {
    MediaAdapter mediaAdapter;

    public void play(String audioType, String fileName) {
       if(audioType.equalsIgnoreCase("MP3")){
          System.out.println("Playing MP3 file. Name: " + fileName);
       }else if(audioType.equalsIgnoreCase("MP4") || audioType.equalsIgnoreCase("VLC")){
          mediaAdapter = new MediaAdapter(audioType);
          mediaAdapter.play(audioType, fileName);
       }else{
          System.out.println("Invalid media. " + audioType + " format not supported");
       }
    }
}
